'use strict';

var path = require('path');
var log4js = require('log4js');

// BASIC CONFIG
const config = {
    // environment
    env: process.env.NODE_ENV || 'dev',
    // port on which to listen
    port: (process.env.NODE_ENV || 'dev') === 'dev' ? 3000 : 5000,
    // path to root directory of this app
    root: path.normalize(__dirname),
    // log level
    logLevel: (process.env.NODE_ENV || 'dev') === 'dev' ? log4js.levels.ALL : log4js.levels.INFO,
    // if debug
    isDebug: (process.env.NODE_ENV || 'dev') === 'dev'
};

module.exports = config;